<template>
	<div>
		<div 
			v-for="(item,index) of dirct" 
			:key="'dirct' + index"
		>
			{{ item.title }}
			<div 
				class="child"
				v-if="item.child"
			>
				<Directory :dirct="item.child"></Directory>
			</div>
		</div>

	</div>
</template>

<script type="text/javascript">
	export default {
		name: 'Directory',
		props: {
			dirct: Array
		}
	}
</script>

<style lang="stylus" scoped>
	.child
		margin-left: 1rem;
</style>